package com.gel.shortLink.convention.exception;

import com.gel.shortLink.common.enums.BaseErrorCode;
import com.gel.shortLink.convention.errorcode.IErrorCode;
import com.gel.shortLink.convention.exception.AbstractException;

public class ClientException extends AbstractException {
    public ClientException(IErrorCode errorCode) {
       this(null,null, errorCode);
    }
    public ClientException(String message) {
        this(message, null, BaseErrorCode.CLIENT_ERROR);
    }
    public ClientException(String message, IErrorCode errorCode) {
        this(message, null, errorCode);
    }



    public ClientException(String message, Throwable cause, IErrorCode errorCode) {
        super(message, cause, errorCode);
    }

    @Override
    public String toString() {
        return  "ClientException{" +
                "errorCode='" + errorCode + '\'' +
                ", errorMessage='" + errorMessage + '\'' +
                '}';
    }
}
